/**
 * Created by Administrator on 2017/3/9 0009.
 */
import Relay from "react-relay";

export default class SaveUserToken extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { saveUserToken }`;
    }

    getVariables() {
        return {
            argsInput: {
                userId: this.props.userId,
                type: this.props.type,
                enId:this.props.enId
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on saveUserTokenPayload {
            saveUserToken {
                errorCode
                token
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
                fragment on saveUserTokenPayload {
                    saveUserToken {
                        errorCode
                        token
                    }
                }
            `]
        }];
    }

}